﻿using Abp.Application.Services.Dto;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace ARchGL.Platform.Electrocar.Application
{
    public static class PagedResultUtils
    {
        public static async Task<PagedResultDto<T>> ToPageResultAsync1<T>(this IQueryable<T> query, int skipCount, int maxResultCount)
        {
            //if (skipCount > 0)
            //    query = query.Skip(skipCount);

            //if (maxResultCount > 0)
            //    query = query.Take(maxResultCount);

            //var totalCount = await query.CountAsync();

            //var result = new PagedResultDto<T>(totalCount,
            //     ObjectMapper.Map<List<T>>(await query.ToListAsync()));

            //return result;

            return null;
        }
    }
}
